package com.tiancheng.trade.order.vo.api;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 退款审核参数
 *
 * @author kellen
 * @date 2024/3/27
 */
@Getter
@Setter
public class RefundAuditVO {

    // 是否通过，发起退款
    private boolean pass;

    // 用户
    @NotEmpty
    private String uid;

    // 主订单号（按照一笔主订单进行退款）
    @NotEmpty
    private String orderId;

    // 退款批次号
    @NotEmpty
    private String paymentId;

    // 子订单实际退款金额提交
    @Valid
    private List<SubOrder> subOrders;

    @Getter
    @Setter
    public static class SubOrder {

        @NotEmpty
        private String subOrderId;
        @NotEmpty
        private String refundId;
        @NotNull
        private Integer refundAmount;
    }
}
